package renderers
{
	import com.salesforce.objects.SObject;
	
	import flash.events.MouseEvent;
	
	import mx.controls.Label;
	import mx.core.IFactory;
	import mx.managers.PopUpManager;
	
	public class QueryParentRecordRenderer extends Label implements IFactory
	{
		public function newInstance():*
		{
			return new QueryParentRecordRenderer();
		}

		/*override public function get test():String {
			
		}*/
		// setting data and design
		override public function set data(value:Object):void
		{
			if (value!=null)
			{
				for (var key:String in value) {
					if (value[key] is SObject) {
						var fieldDef:SObject = value[key] as SObject;
						for (var pkey:String in fieldDef) {
							if (pkey.toLowerCase() != "id" && pkey.toLowerCase() != "type") {
								text = fieldDef[pkey];
							}
						}
					}
				}
			}
			super.data=value;
		}
		
	}
}